<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>组织添加修改</title>
<base target="_self" />
<link href="Styles/ts_css.css" rel="stylesheet" type="text/css" />
<link href="../Styles/css.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
<script src="Scripts/jquery.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
	$(function() {
		//必填项验证
		$("#isShows").hide();
		var typeval = $("#ddEmployeesType").find("option:selected").val();
		if (typeval == "1") {
			$("#isShows").show();
		}
		$("#btnSubmit").click(function() {
			var name = $("#txtName").val();
			if (name == "" || name == null) {
				alert("请填写组织名称");
				return false;
			}
			if (name.length > 50) {
				alert("组织名称输入过长");
				return false;
			}
			var typeval = $("#ddEmployeesType").find("option:selected").val();
			if (typeval == "1") {
				var alias = $("#txtAlias").val();
				if (alias == "" || alias == null) {
					alert("广场编号不能为空");
					return false;
				}

				var partten = /^[a-zA-Z]*$/;
				if (!partten.exec(alias) || alias.length < 4) {
					alert("广场编号格式不正确，只能输入4位英文字母");
					return false;
				}

			}
			var comment = $("#txtComment").val();
			if (comment.length > 0) {
				if (comment.length > 1000) {
					alert("备注输入超过有限长度,最多1000个字符");
					return false;
				}
			}
		});
		$("#ddEmployeesType").change(function() {
			var typeval = $("#ddEmployeesType").find("option:selected").val();
			if (typeval == "1") {
				$("#txtAlias").val($("#hidAlias").val());
				$("#isShows").show();
			} else {
				$("#isShows").hide();
			}
		});
	});
	function page_Close() {
		if (window.parent != null) {
			window.parent.close();
		} else {
			window.close();
		}
	}
</script>
</head>
<form action="updateSelect.do" method="post">
	<input type="hidden" name="customerId"
		value="${wd_ht_customer.customerId}" /> 客户编号:<input type="text"
		name="customerId" value="${wd_ht_customer.customerId}" /><br />
	<br /> 客户姓名:<input type="text" name="customerName"
		value="${wd_ht_customer.customerName}" /><br />
	
		
    <br />性&nbsp;&nbsp;别: <input type="radio" id="sex" name="sex" ${wd_ht_customer.sex=='男'?'checked':''} value="男"> <label for="flat-radio-1" class="" >男</label>  
	<input type="radio" id="sex" name="sex" ${wd_ht_customer.sex=='女'?'checked':''} value="女"> <label for="flat-radio-1" class="" >女</label><br/>
		
	<br />客户类型: <input type="radio" id="customerType" name="customerType" ${wd_ht_customer.customerType=='个人'?'checked':''} value="个人"> <label for="flat-radio-1" class="" >个人</label>  
	<input type="radio" id="customerType" name="customerType" ${wd_ht_customer.customerType=='公司'?'checked':''} value="公司"> <label for="flat-radio-1" class="" >公司</label><br/>	
	
	<br /> 描&nbsp;&nbsp;述:<input type="text" name="describel"
		value="${wd_ht_customer.describel}" /><br />
		
	<br />婚姻状况: <input type="radio" id="maritalStatus" name="maritalStatus" ${wd_ht_customer.maritalStatus=='已婚'?'checked':''} value="已婚"> <label for="flat-radio-1" class="" >已婚</label>  
	<input type="radio" id="maritalStatus" name="maritalStatus" ${wd_ht_customer.maritalStatus=='未婚'?'checked':''} value="未婚"> <label for="flat-radio-1" class="" >未婚</label><br/>	
		
	
	<br /> 通讯地址:<input type="text" name="address"
		value="${wd_ht_customer.address}" /><br />
	<br /> <input type="submit" value="提交" />
</form>
</html>


